<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>参数传递</title>
</head>
<body>
    <div id="app">
        <h3>{{name}}</h3>
        <h3>{{age}}</h3>
        <button @click="change('dd',2)">点击更改事件</button>
    </div>
</body>
</html>
<script src="./js/2.7.14_dist_vue.js"></script>
<script>
    new Vue({
        el:"#app",
        data:{
            name:"cc",
            age:1
        },
        methods:{
            change(name,age){
                this.name=name,
                this.age=age;
            }
        }
    })
</script>